<template>
	<view class="container">
		<view class="square" v-if="Info.ID==0">
			<view class="tip">你还没有红娘，请选择一个红娘为你服务</view>
			<view class="bind" @click="BindMatcher()">点此绑定</view>
		</view>
		<view class="square" v-if="Info.ID>0">
			<view class="title">{{Info.NickName}}</view>
			<view class="headimg"><image :src="Tools.GetImg(Info.HeadImg,500)" mode="aspectFill" /></view>
			<view class="line"><view class="name">昵称</view><view class="value">{{Info.NickName}}</view></view>
			<view class="line"><view class="name">性别</view><view class="value">{{Info.Sex}}</view></view>
			<view class="line"><view class="name">年龄</view><view class="value">{{Info.Age}}岁</view></view>
			<view class="line"><view class="name">微信号</view><view class="value">{{Info.WeiXin}}</view></view>
			<view class="line"><view class="name">手机号码</view><view class="value">{{Info.Mobile}}</view><view class="mobile" @click="OpenCall(Info.Mobile)"><image src="/static/dianhua.png"/></view></view>
			<view class="line"><view class="name">学历</view><view class="value">{{Info.Education}}</view></view>
			<view class="line"><view class="name">是否是党员</view><view class="value">{{Info.RParty}}</view></view>
			<view class="line"><view class="name">所在区域</view><view class="value">{{Info.RLivePlace}}</view></view>
			<!-- <view class="line"><view class="name2">详细地址</view><view class="value2">{{Info.RLiveName+"（"+Info.RLiveAddress+"）"}}</view></view> -->
			<view class="line"><view class="name2">个人荣誉</view><view class="value2">{{Info.RHonor==""?"未填写":Info.RHonor}}</view></view>
			<view class="line"><view class="name2">个人特长</view><view class="value2">{{Info.RTalent==""?"未填写":Info.RTalent}}</view></view>
			<view class="line"><view class="name2">志愿宣言</view><view class="value2">{{Info.RDeclaration==""?"未填写":Info.RDeclaration}}</view></view>
			<view class="line"><view class="name2">红娘介绍</view><view class="value2">{{Info.RBrief==""?"未填写":Info.RBrief}}</view></view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				Info:{ID:0}
			};
		},
		onShow() {
			uni.$once("MatcherSelect",Info=>{				
				this.Info=Info;
			});
		},
		onLoad() {
			this.Find_MyMatcher();
		},
		methods:{
			BindMatcher(){
				uni.navigateTo({
					url:"/pages/matcher/matcherselect"
				})
			},
			OpenCall(Mobile){
				uni.makePhoneCall({
					phoneNumber: Mobile //仅为示例
				});
			},
			Find_MyMatcher(){
				var data = {};
				data.Act="Find_MyMatcher";
				this.Util.Loading("加载中...");
				this.Util.Post(data, json=>{
					this.Util.HideLoading();
					uni.stopPullDownRefresh();
					uni.hideNavigationBarLoading();
					this.Info = json.Data.Info;
				});
			}
		}
	}
</script>

<style lang="scss">
	.container{
		.square{width:700rpx; min-height: 800rpx; margin:0 auto; background-color: #ffffff; border-radius: 20rpx; margin-top:25rpx; margin-bottom: 35rpx; padding-top:20rpx; padding-left:40rpx; padding-right: 40rpx; padding-bottom: 20rpx;
			.tip{width:100%; height: 380rpx; padding-top:160rpx; line-height: 60rpx; text-align: center; font-size:34rpx; color:#696969;}
			.bind{width:300rpx; height:90rpx; line-height: 90rpx; margin:0 auto; font-size:32rpx; border-radius: 20rpx; text-align: center; background-color: #4682e9; color:#ffffff;}
			.bind:active{opacity: 0.6;}
			.title{width:100%; height:80rpx; line-height: 80rpx; text-align: center; font-size:36rpx; font-weight: bold;} 
			.headimg{width:100%; margin:0 auto; margin-top:10rpx; margin-bottom: 30rpx; image{width:620rpx; height:620rpx; border-radius: 20rpx;}}
			.line{width:100%; min-height:45rpx; line-height: 45rpx; margin:0 auto; margin-top: 10rpx; margin-bottom: 15rpx; display: flex; flex-direction: row; flex-wrap: wrap; font-size:32rpx;
				.name{width:220rpx; color:#000000;}
				.value{flex:1; color:#a4a4a4;}
				.name2{width:100%; color:#000000;}
				.value2{width:100%; color:#a4a4a4; padding-top:0rpx; padding-bottom: 15rpx;}
				.mobile{width:50rpx; height: 50rpx; margin-top:-7rpx; border-radius: 25rpx; padding:5rpx; background-color: #4682e9; image{width:40rpx; height: 40rpx;}}
			}
		}
	}
</style>
